public class towork1 {
    public static void main(String[] args) {
        int n=0;
        for (int i=2024;;i++){
            if(i%2024==0&&i%1024==0)
            {
                n=i;
                break;
            }
        }
        System.out.println(n);
    }
}
